//
//  CommontTableCell.m
//  LoveFreshBeen
//
//  Created by vinsent on 16/10/21.
//  Copyright © 2016年 魏根. All rights reserved.
//

#import "CommontTableCell.h"

@interface CommontTableCell ()

@property (weak, nonatomic) IBOutlet UIStackView *stackImageV;

@property (weak, nonatomic) IBOutlet UILabel *commontLab;

@property(nonatomic,assign) NSNumber *star;
@end

@implementation CommontTableCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
    
 
}


- (void)setOrder:(OrderViewModel *)order {
    _order = order;
    self.commontLab.text = order.myorderModel.comment;
    self.star = order.myorderModel.star;
    int num = [self.star intValue];
    
    for (UIImageView *v in self.stackImageV.subviews) {
        if (num == 0) {
            return;
        }
        [v setHighlighted:YES];
        num --;
    }
}

@end
